package com.ccsc.auth.entity.vi;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 用户
 * Created by XingWen on 2017/2/8.
 */
public class UserVi {
    private Integer id;//用户id
    @NotEmpty(message = "{acctname.not.empty}")
    private String account;//用户账号
    @NotEmpty(message = "{realname.not.empty}")
    private String name;//姓名
    @NotEmpty(message = "{password.not.empty}")
    private String password;//用户密码
    private Integer sex;//用户性别
    //@Email(message = "{usermail.not.correct}")
    private String mail;//邮箱
    @Pattern(regexp = "^[0-9]{5,11}$", message= "{user.phone.regexp}")
    private String phone;//电话
    private String status;//状态
    private String remarks;//备注
    @NotNull(message = "{user.dept.not.empty}")
    private Integer departmentId;//部门id
    @NotNull(message = "{user.posi.not.empty}")
    private Integer positionId;//职位id
    @Size(min=1, message = "{user.role.not.empty}")
    private Integer[] roleIds;//角色ids
    private Integer rdopId;

    /**
     * 多了两个字段
     * @return
     */
    //是否选择电话方式
    private Integer phoneVerify;
    //如果是ip方式 ipVerify.size()>0 则填写ip段 并且填入数据
    private List<List<String>> ipVerify;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public Integer getPositionId() {
        return positionId;
    }

    public void setPositionId(Integer positionId) {
        this.positionId = positionId;
    }

    public Integer[] getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(Integer[] roleIds) {
        this.roleIds = roleIds;
    }

    public Integer getRdopId() {
        return rdopId;
    }

    public void setRdopId(Integer rdopId) {
        this.rdopId = rdopId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getPhoneVerify() {
        return phoneVerify;
    }

    public void setPhoneVerify(Integer phoneVerify) {
        this.phoneVerify = phoneVerify;
    }

    public List<List<String>> getIpVerify() {
        return ipVerify;
    }

    public void setIpVerify(List<List<String>> ipVerify) {
        this.ipVerify = ipVerify;
    }
}
